package com.cxb.apiBoss.remote;

import com.cxb.internalcommon.dto.Car;
import com.cxb.internalcommon.dto.DriverCarBindingRelationship;
import com.cxb.internalcommon.dto.DriverUser;
import com.cxb.internalcommon.dto.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("service-driver-user")
public interface ServiceDriverUserClient {

    /**
     * 调用service-driver-user的addDriverUser接口
     * @param driverUser
     * @return
     */
    //添加司机
    @PostMapping("/user")
    public ResponseResult addDriverUser(@RequestBody DriverUser driverUser);

    //修改司机信息
    @PutMapping("/user")
    public ResponseResult modifyDriverUser(@RequestBody DriverUser driverUser);

    //添加车辆信息
    @PostMapping("/car")
    public ResponseResult addCar(@RequestBody Car car);

    //车辆和司机绑定
    @PostMapping("/driver-car-binding-relationship/bind")
    public ResponseResult bind(@RequestBody DriverCarBindingRelationship driverCarBindingRelationship);

    //车辆和司机解绑
    @PostMapping("/driver-car-binding-relationship/unbind")
    public ResponseResult unbind(@RequestBody DriverCarBindingRelationship driverCarBindingRelationship);


}
